<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="cc.woori.mobile.bean.*" %>
<%@ page import="cc.woori.mobile.PMF" %>
<%@ page import="javax.jdo.*" %>
<%@ page import="com.google.appengine.api.datastore.*" %>
<%
String reqKey = request.getParameter("key");
Key key = KeyFactory.stringToKey(reqKey);
PersistenceManager pm = PMF.get().getPersistenceManager();

NoteEntity en = null;

try {
	en = pm.getObjectById(NoteEntity.class, key);
    
} finally {
    if (pm != null) {
	pm.close();
    }
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
    <form name="input" action="/admin/note/modify?mode=edit&key=<%=reqKey%>" method="post">
    	<table>
          <tr>
	        <td>제목</td>
	        <td><input type="text" name="title" size="80" value="<%=en.getTitle() %>"/></td>
	      </tr>
	      <tr>
	        <td>설명</td>
	        <td><TEXTAREA name="body" rows="10" cols="80"><%=en.getBody().getValue() %></TEXTAREA></td>
	      </tr>
	      <tr>
      		<td colspan="2"><input type="submit" value="등록" /></td>
      	</tr>
		</table>
    </form>
</body>
</html>